using System;
using MinimalistFoodStreet.BackEnd.Infrastructure.EFCore;
using MinimalistFoodStreet.BackEnd.Infrastructure.Dtos.Request.Tables;

namespace MinimalistFoodStreet.BackEnd.Server.Server.RequestExtend.Tables
{
    public static class SuppliersRequestCreateExtend
    {
        public static Supplier ToCreateEntity(this RequestCreateSuppliersDto dto)
        {
            return new Supplier
            {
                SShopName=dto.shopName,
                SAccountId = dto.accountId,
                SOpenId = dto.openId,
                SAddress = dto.address,
                SType = dto.type,
                SAnnouncement = dto.announcement,
                SEnterpriseName = dto.enterpriseName,
                SLogo = "",
                SQualification = "",
                SPhoto = ""
            };
        }
    }
}